package com.project.bean;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.time.LocalDate;
import java.util.List;

public class TopicBean {
    private int id;
    private String name;
    private String auth;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate date=LocalDate.now();
    private int count;
    private List<DiscussBean> list;
    private ChannelBean channelBean;

    public TopicBean(String name, String auth,  int channelId) {
        this.name = name;
        this.auth = auth;
        this.channelBean = new ChannelBean();
        this.channelBean.setId(channelId);
    }

    @Override
    public String toString() {
        return "TopicBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", auth='" + auth + '\'' +
                ", date=" + date +
                ", count=" + count +
                ", list=" + list +
                ", channelBean=" + channelBean +
                "}\n";
    }

    public TopicBean() {
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAuth() {
        return auth;
    }

    public void setAuth(String auth) {
        this.auth = auth;
    }

    public LocalDate getDate() {
        return date;
    }

    public void setDate(LocalDate date) {
        this.date = date;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public List<DiscussBean> getList() {
        return list;
    }

    public void setList(List<DiscussBean> list) {
        this.list = list;
    }

    public ChannelBean getChannelBean() {
        return channelBean;
    }

    public void setChannelBean(ChannelBean channelBean) {
        this.channelBean = channelBean;
    }
}
